<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        document.addEventListener('click', function (e) {
            //  client 鼠标在可视区的x和y坐标
            console.log(e.clientX);
            console.log(e.clientY);
            console.log('----------------------');
            //  page 鼠标在页面文档的x和y坐标
            console.log(e.pageX);
            console.log(e.pageY);

        })
    </script>
</body>

</html>